<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

// Route::middleware('auth:api')->get('/user', function (Request $request) {
//     return $request->user();
// });


Route::get('alidata/getlocation', 'Api\AlidataController@getLocation');
Route::get('alidata/getrisk', 'Api\AlidataController@getRisk');
Route::get('alidata/getcompany', 'Api\AlidataController@getCompany');
Route::get('alidata/getmonth', 'Api\AlidataController@getMonth');
Route::get('alidata/getpost', 'Api\AlidataController@getPost');
Route::post('alidata/getpost', 'Api\AlidataController@getPost');
Route::get('updateVersion', 'Api\UpdateController@getLatestVersion');
Route::get('handexport', 'Api\NinecheckController@handexport');
Route::post('login', 'Api\LoginController@login');
Route::post('member/register', 'Api\MemberController@register');

/*法律法规详情页面*/
Route::get('law/detail', 'Api\LawController@detail')->name('api_law_detail');
Route::get('punish/detail', 'Api\PunishController@detail')->name('api_punish_list');
/*法律法规依据*/
Route::get('law/basis', 'Api\LawController@basis');

Route::get('ninecheck/download/{companyId}', 'Api\NinecheckController@download');
Route::post('scompany/uploadcompic', 'Api\SmallplaceController@uploadcompic');
Route::group(['middleware' => 'auth:api'], function() {

    
    // h5 获取自定义字段
    Route::get('getfieldcomjson', 'Admin\UserController@mgetfieldcom');
    Route::post('fieldcomcreate', 'Admin\UserController@fieldcomcreate');
    Route::get('getfieldresidentjson', 'Admin\UserController@mgetfieldresident');
    Route::post('fieldresidentcreate', 'Admin\UserController@fieldresidentcreate');


    Route::post('addreport', 'Api\UserController@addreport');
    Route::get('getreportlist', 'Api\UserController@getreportlist');

    Route::post('getmsgdetail', 'Api\UserController@getmsgdetail');
    Route::get('getmsglist', 'Api\UserController@getmsglist');

    
    Route::post('company/search', 'Api\CompanyController@search');
    Route::post('company/create', 'Api\CompanyController@create');
    Route::post('company/search_com', 'Api\CompanyController@search_com');

    Route::post('check/create', 'Api\ComcheckController@create');
    Route::post('check/getChecknegative', 'Api\ComcheckController@getChecknegative');
    Route::post('check/getCheckaccord', 'Api\ComcheckController@getCheckaccord');
    Route::post('check/choose', 'Api\ComcheckController@choose');
    Route::post('check/show', 'Api\ComcheckController@show');
    Route::post('check/inconform', 'Api\ComcheckController@inconform');
    Route::post('upload/uploadimg','Api\UploadController@uploadImg');
    Route::post('upload/uploadAll','Api\UploadController@uploadAll');
    Route::post('upload/uploadmp4','Api\UploadController@uploadMp4');
    Route::post('check/inconformdel', 'Api\ComcheckController@inconformdel');
    Route::post('check/exportWord1', 'Api\ComcheckController@exportWord1');


//初查
    Route::post('ninesmall/firetype', 'Api\NinesmallController@firetype');
    Route::post('ninesmall/choose', 'Api\NinesmallController@choose');
    Route::post('ninesmallself/firetype', 'Api\NinesmallselfController@firetype');
    //自查 初查
    Route::post('ninesmallself/firsttype', 'Api\NinesmallselfController@firsttype');
    Route::post('ninesmallself/choose', 'Api\NinesmallselfController@choose');
    Route::post('exportproject', 'Api\NinesmallController@export');
    Route::post('ninecheck/choose', 'Api\NinecheckController@choose');
    Route::post('ninecheck/show', 'Api\NinecheckController@show');
    Route::post('ninecheck/update', 'Api\NinecheckController@update');
    Route::post('ninecheck/updatepost', 'Api\NinecheckController@updatepost');
    Route::post('ninecheck/showelse', 'Api\NinecheckController@showelse');
    Route::post('ninecheck/create', 'Api\NinecheckController@create');
    Route::post('ninecheck/createelse', 'Api\NinecheckController@createelse');
    Route::post('ninecheck/downloadwords', 'Api\NinecheckController@downloadwords');
    Route::post('ninecheck/finish', 'Api\NinecheckController@finish');
    Route::post('ninecheck/signature', 'Api\NinecheckController@signature');
    Route::post('ninecheck/checkdelete', 'Api\NinecheckController@checkdelete');
    Route::post('ninecheckself/choose', 'Api\NinecheckselfController@choose');
    Route::post('ninecheckself/show', 'Api\NinecheckselfController@show');
    Route::post('ninecheckself/update', 'Api\NinecheckselfController@update');
    Route::post('ninecheckself/updatepost', 'Api\NinecheckselfController@updatepost');
    Route::post('ninecheckself/showelse', 'Api\NinecheckselfController@showelse');
    Route::post('ninecheckself/create', 'Api\NinecheckselfController@create');
    Route::post('ninecheckself/createelse', 'Api\NinecheckselfController@createelse');
    Route::post('ninecheckself/downloadwords', 'Api\NinecheckselfController@downloadwords');
    Route::post('ninecheckself/finish', 'Api\NinecheckselfController@finish');
    Route::post('ninecheckself/signature', 'Api\NinecheckselfController@signature');
    Route::post('ninecheckself/checkdelete', 'Api\NinecheckselfController@checkdelete');
    Route::post('check/getChecknegative', 'Api\ComcheckController@getChecknegative');
    Route::post('check/getCheckaccord', 'Api\ComcheckController@getCheckaccord');
    Route::post('today_statistics', 'Api\StatisticsController@TodayStatistics');
    Route::post('area_statistics', 'Api\StatisticsController@areaStatistics');
    Route::post('getprovince', 'Api\StatisticsController@getProvince');
    Route::post('getregion', 'Api\StatisticsController@getRegion');
    Route::post('export', 'Api\StatisticsController@export');
    Route::post('exportlist', 'Api\StatisticsController@exportlist');
    Route::post('ninesmall/mysearch', 'Api\NinesmallController@mysearch');

    //项目
    Route::post('project', 'Api\ProjectController@index');
    Route::post('one', 'Api\ProjectController@one');
    Route::post('/project/update', 'Api\ProjectController@update');
    Route::post('/project/delete', 'Api\ProjectController@delete');
    Route::post('/project/company', 'Api\ProjectController@company');
    Route::post('/ninesmall/project_statistics', 'Api\NinesmallController@ProjectStatistics');
    //    Route::get('smallplace/downword/{companyId}', 'Home\SmallplacecheckController@downWord')->name('smallplace_downword');
    //    Route::get('project/company/{projectId}', 'Home\ProjectController@company')->name('project_company');
    //隐患整改
    Route::post('danger/dangercheck', 'Api\DangerController@dangercheck');
    Route::post('danger/danger_save', 'Api\DangerController@checkDangerSave');
    Route::post('ninesmall/companyone', 'Api\NinesmallController@companyone');

    /*九小场所路由接口*/
    Route::post('scompany/create', 'Api\SmallplaceController@create');
    Route::post('scompany/update', 'Api\SmallplaceController@update');
    Route::post('scompany/savetag','Admin\UserController@savetag');
    Route::any('scompany/gettaglist','Admin\UserController@gettaglist');
    
    
    Route::post('scompany/gupdate', 'Api\SmallplaceController@gupdate');
    Route::post('scompany/household', 'Api\SmallplaceController@household');
    Route::get('scompany/getresidentinfo', 'Api\SmallplaceController@getresidentinfo');
    Route::post('scompany/uphousehold', 'Api\SmallplaceController@uphousehold');
    Route::get('scompany/getCompany', 'Api\SmallplaceController@getCompany');
    Route::get('scompany/getCompanyList', 'Api\SmallplacecheckController@getCompanyList');
    Route::get('scompany/getCheckAgain', 'Api\SmallplacecheckController@checkAgain');
    Route::post('scompany/checkAgainSave', 'Api\SmallplacecheckController@checkAgainSave');
    Route::get('scompany/getWords', 'Api\SmallplacecheckController@getWords');
    Route::get('logout', 'Api\LoginController@logout');
    Route::post('resetPassword', 'Api\UserController@resetPassword');
    /*法律法规*/
    Route::get('law/list', 'Api\LawController@list');
    /*处置处罚*/
	Route::get('punish/list', 'Api\PunishController@list')->name('api_punish_list');
    //修改签名
    Route::post('ninesmall/uploadsignature', 'Api\NinesmallController@uploadSignature');

    //获取发送用户列表
    Route::get('message/getUsers', 'Api\MessageController@getUsers')->name('message_get_users');
    //发送消息
    Route::post('message/sendMessage', 'Api\MessageController@sendMessage')->name('message_send_message');
    //发送消息列表
    Route::get('message/sendMessageList', 'Api\MessageController@sendMessageList')->name('message_send_message_list');
    //接收消息列表
    Route::get('message/reciveMessageList', 'Api\MessageController@reciveMessageList')->name('message_recive_message_list');
    //消息详情
    Route::get('message/messageDetail', 'Api\MessageController@messageDetail')->name('message_detail');

    Route::post('staff/signin', 'Api\StaffController@signin');
    Route::get('staff/signinlist', 'Api\StaffController@signin_list');
	Route::get('staff/trajectory', 'Api\StaffController@trajectory');
	Route::post('staff/leave', 'Api\StaffController@leave');
	Route::post('staff/getleave', 'Api\StaffController@getleave');
	Route::post('staff/summary', 'Api\StaffController@summary');
	Route::post('staff/upsummary', 'Api\StaffController@upsummary');
	Route::post('staff/getsummary', 'Api\StaffController@getsummary');

    //视频文档列表
    Route::post('video/dataList', 'Api\VideoController@dataList');
    //添加视频观看时长记录
    Route::post('video/recordVideo', 'Api\VideoController@recordVideo');
    //获取视频观看时长记录
    Route::post('video/reportlist', 'Api\VideoController@reportlist');
    Route::any('video/getpush', 'Api\VideoController@getpush');
    Route::any('video/startpush', 'Api\VideoController@startpush');
    Route::any('video/endpush', 'Api\VideoController@endpush');

    //需求上传
    Route::post('demang/create', 'Api\DemandController@create');
    //需求列表
    Route::post('demang/list', 'Api\DemandController@list');
    //注销申请
    Route::post('demang/unitcreate', 'Api\DemandController@unitcreate');
    //注销列表
    Route::post('demang/unitlist', 'Api\DemandController@unitlist');
    //注销公司列表
    Route::post('demang/getCompanyList', 'Api\DemandController@getCompanyList');

    
    // 前端考试部分
    Route::post('paper/list', 'Api\ExamController@paper_list');
    Route::post('paper/one', 'Api\ExamController@paper_one');

    Route::post('paper/answer', 'Api\ExamController@paper_answer');
    Route::post('paper/examination', 'Api\ExamController@paper_examination');
    Route::post('paper/wrong', 'Api\ExamController@answer_wrong');
    // 新增页面-考试记录
    Route::any('paper/user_exam_record', 'Api\ExamController@user_exam_record');
    Route::any('paper/record_detail', 'Api\ExamController@record_detail');

    

    // 物资分类
    Route::any('goods/goodslistdata', 'Api\GoodsController@goodslistdata')->name('Api.goods.goodslistdata');
    Route::any('goods/exportone','Api\GoodsController@exportone')->name('Api.goods.exportone');
    Route::any('goods/downloadUrl','Api\GoodsController@downloadUrl')->name('Api.goods.downloadUrl');
    Route::any('goods/referweb','Api\GoodsController@referweb')->name('Api.goods.referweb');
    Route::any('goods/goodsdo','Api\GoodsController@goodsdo')->name('Api.goods.goodsdo');
    Route::any('goods/goodsdelete','Api\GoodsController@goodsdelete')->name('Api.goods.goodsdelete');
    Route::any('goods/goods_all','Api\GoodsController@goods_all')->name('Api.goods.goods_all');
    Route::any('goods/goods_all_app','Api\GoodsController@goods_all_app')->name('Api.goods.goods_all_app');
    Route::any('goods/getcount','Api\GoodsController@getcount')->name('Api.goods.getcount');
    // 物资名称
    Route::any('materialList/list_data', 'Api\MaterialListController@list_data')->name('Api.materialList.list_data');
    Route::any('materialList/exportone','Api\MaterialListController@exportone')->name('Api.materialList.exportone');
    Route::any('materialList/referweb','Api\MaterialListController@referweb')->name('Api.materialList.referweb');
    Route::any('materialList/refer','Api\MaterialListController@refer')->name('Api.materialList.refer');
    Route::any('materialList/delete','Api\MaterialListController@delete')->name('Api.materialList.delete');
    Route::any('materialList/material_all','Api\MaterialListController@material_all')->name('Api.materialList.material_all');
    Route::any('materialList/exportoneBygid','Api\MaterialListController@exportoneBygid')->name('Api.materialList.exportoneBygid');
    // 物资库存，入库，入库明细
    Route::any('warehouseMaterials/warehouseMaterialslistdata', 'Api\WarehouseMaterialsController@warehouseMaterialslistdata')->name('Api.warehouseMaterials.warehouseMaterialslistdata');
    Route::any('warehouseMaterials/warehouseMaterialsexportone','Api\WarehouseMaterialsController@warehouseMaterialsexportone')->name('Api.warehouseMaterials.warehouseMaterialsexportone');
    Route::any('warehouseMaterials/referweb','Api\WarehouseMaterialsController@referweb')->name('Api.warehouseMaterials.referweb');
    Route::any('warehouseMaterials/referwebtoapp','Api\WarehouseMaterialsController@referwebtoapp')->name('Api.warehouseMaterials.referwebtoapp');
    Route::any('warehouseMaterials/warehouseMaterialsRefer','Api\WarehouseMaterialsController@warehouseMaterialsRefer')->name('Api.warehouseMaterials.warehouseMaterialsRefer');
    Route::any('warehouseMaterials/material_del','Api\WarehouseMaterialsController@material_del')->name('Api.warehouseMaterials.material_del');
    Route::any('warehouseMaterials/warehouseOrderListData','Api\WarehouseMaterialsController@warehouseOrderListData')->name('Api.warehouseMaterials.warehouseOrderListData');
    Route::any('warehouseMaterials/warehouseOrderExportone','Api\WarehouseMaterialsController@warehouseOrderExportone')->name('Api.warehouseMaterials.warehouseOrderExportone');
    Route::any('warehouseMaterials/warehouseOrderData','Api\WarehouseMaterialsController@warehouseOrderData')->name('Api.warehouseMaterials.warehouseOrderData');
    //Route::any('warehouseMaterials/storage_import','Api\WarehouseMaterialsController@storage_import')->name('Api.warehouseMaterials.storage_import');
    Route::any('warehouseMaterials/storage_import','Api\WarehouseMaterialsController@storage_import_url')->name('Api.warehouseMaterials.storage_import');
    Route::any('warehouseMaterials/warehouse_type_all','Api\WarehouseMaterialsController@warehouse_type_all')->name('Api.warehouseMaterials.warehouse_type_all');
    Route::any('warehouseMaterials/storage_import1','Api\WarehouseMaterialsController@storage_import1')->name('Api.warehouseMaterials.storage_import1');

    //物资明细
    Route::any('stock/stocklistdata', 'Api\StockController@stocklistdata')->name('Api.stock.stocklistdata');
    Route::any('stock/stocklistdatatoadd', 'Api\StockController@stocklistdatatoadd')->name('Api.stock.stocklistdatatoadd');
    Route::any('stock/stockexportone','Api\StockController@stockexportone')->name('Api.stock.stockexportone');
    Route::any('stock/materials_trend','Api\StockController@materials_trend')->name('Api.stock.materials_trend');
    Route::any('stock/trend_exportone','Api\StockController@trend_exportone')->name('Api.stock.trend_exportone');
    Route::any('stock/checkcategory_all','Api\StockController@checkcategory_all')->name('Api.stock.checkcategory_all');
    Route::any('stock/company_all','Api\StockController@company_all')->name('Api.stock.company_all');
    Route::any('stock/status_all','Api\StockController@status_all')->name('Api.stock.status_all');
    Route::any('stock/getdetailall','Api\StockController@getdetailall')->name('Api.stock.getdetailall');
    Route::any('stock/getstockid','Api\StockController@getstockid')->name('Api.stock.getstockid');
    //物资出库
    Route::any('warehouseOutbound/listData', 'Api\WarehouseOutboundController@listData')->name('Api.warehouseOutbound.listData');
    Route::any('warehouseOutbound/exportone','Api\WarehouseOutboundController@exportone')->name('Api.warehouseOutbound.exportone');
    Route::any('warehouseOutbound/outboundOrderData','Api\WarehouseOutboundController@outboundOrderData')->name('Api.warehouseOutbound.outboundOrderData');
    Route::any('warehouseOutbound/referweb','Api\WarehouseOutboundController@referweb')->name('Api.warehouseOutbound.referweb');
    Route::any('warehouseOutbound/refer','Api\WarehouseOutboundController@refer')->name('Api.warehouseOutbound.refer');
    Route::any('warehouseOutbound/outbound_del','Api\WarehouseOutboundController@outbound_del')->name('Api.warehouseOutbound.outbound_del');
    //Route::any('warehouseOutbound/outbound_import','Api\WarehouseOutboundController@outbound_import')->name('Api.warehouseOutbound.outbound_import');
    Route::any('warehouseOutbound/outbound_import','Api\WarehouseOutboundController@outbound_import_url')->name('Api.warehouseOutbound.outbound_import');
    Route::any('warehouseOutbound/outbound_imports','Api\WarehouseOutboundController@outbound_imports')->name('Api.warehouseOutbound.outbound_imports');

    // 晨会、早课管理
    Route::any('meet/listdata', 'Api\MeetController@listdata')->name('Api.meet.listdata');
    Route::any('meet/exportone','Api\MeetController@exportone')->name('Api.meet.exportone');
    Route::any('meet/referweb','Api\MeetController@referweb')->name('Api.meet.referweb');
    Route::any('meet/meetsdo','Api\MeetController@meetsdo')->name('Api.meet.meetsdo');
    Route::any('meet/del','Api\MeetController@del')->name('Api.meet.del');
    Route::any('meet/comlist_pro','Api\MeetController@comlist_pro')->name('Api.meet.comlist_pro');
    Route::any('meet/comlistdata','Api\MeetController@comlistdata')->name('Api.meet.comlistdata');
    Route::any('meet/comexportone','Api\MeetController@comexportone')->name('Api.meet.comexportone');
    Route::any('meet/meetlistdata','Api\MeetController@meetlistdata')->name('Api.meet.meetlistdata');

    // 物资的盘点，维修，保养
        // 查询物资列表
        Route::get('goods/list', 'Api\MaintenanceController@get_goods_list');
        // 查询企业分类列表
        Route::get('category/list', 'Api\MaintenanceController@get_category_list');
        // 查询企业列表
        Route::get('company/list', 'Api\MaintenanceController@get_company_list');
        // 查询物资分类
        
        Route::get('goods/category', 'Api\MaintenanceController@category');
        Route::get('user/list', 'Api\MaintenanceController@check_user');
        

        
        
        // 盘点 列表+添加+删除
        Route::any('check/list', 'Api\MaintenanceController@check_records');
        Route::any('check/edit', 'Api\MaintenanceController@check_records_edit');
        Route::any('check/data', 'Api\MaintenanceController@check_edit_data');
        Route::any('check/delete', 'Api\MaintenanceController@check_delete');
        Route::any('check/excel_url', 'Api\MaintenanceController@get_excel_url_check');//导出excel
        Route::any('check/detail', 'Api\MaintenanceController@check_detail');
        // 

        // 维修 列表+添加+删除
        Route::any('repair/list', 'Api\MaintenanceController@repair_records');
        Route::any('repair/edit', 'Api\MaintenanceController@repair_records_edit');
        Route::any('repair/data', 'Api\MaintenanceController@repair_edit_data');
        Route::any('repair/delete', 'Api\MaintenanceController@repair_delete');
        Route::any('repair/excel_url', 'Api\MaintenanceController@get_excel_url_repair');//导出excel
        Route::any('repair/detail', 'Api\MaintenanceController@repair_detail');
        // 保养 列表+添加+删除
        Route::any('maintain/list', 'Api\MaintenanceController@maintain_records');
        Route::any('maintain/edit', 'Api\MaintenanceController@maintain_records_edit');
        Route::any('maintain/data', 'Api\MaintenanceController@maintain_edit_data');
        Route::any('maintain/delete', 'Api\MaintenanceController@maintain_delete');
        Route::any('maintain/excel_url', 'Api\MaintenanceController@get_excel_url_maintain');//导出excel
        Route::any('maintain/detail', 'Api\MaintenanceController@maintain_detail');
        // 盘点出库入库的查询
                
        Route::any('check/materials_data', 'Api\MaintenanceController@materials_data');
        // 随手拍
        Route::any('records/list', 'Api\DangerrecordsController@list');
        Route::any('records/edit', 'Api\DangerrecordsController@edit');
        Route::any('records/data', 'Api\DangerrecordsController@data');
        Route::any('records/delete', 'Api\DangerrecordsController@delete');

    


    // 晨会、早课管理
    Route::any('meet/listdata', 'Api\MeetController@listdata')->name('Api.meet.listdata');
    Route::any('meet/exportone','Api\MeetController@exportone')->name('Api.meet.exportone');
    Route::any('meet/referweb','Api\MeetController@referweb')->name('Api.meet.referweb');
    Route::any('meet/meetsdo','Api\MeetController@meetsdo')->name('Api.meet.meetsdo');
    Route::any('meet/del','Api\MeetController@del')->name('Api.meet.del');

});